// 封装banner轮播图相关的业务代码
import { ref, onMounted } from 'vue'
import { getBannersAPI } from '@/apis/home'

export function useBanner () {
    const bannerList = ref([])
    const getBannerList = async () => {
        const res = await getBannersAPI({
        distributionSite: '2'
      })
    //   console.log(res)
      bannerList.value = res.result
    }
    onMounted(() => getBannerList())

  return {
    bannerList
  }
}